package com.mby.entity;

/**
 * Created by noah on 2018/4/17.
 */
public class DmsUser {

    private Integer IS_ONJOB;
    private String DEALER_CODE;
    private String EMP_ROLE;
    private String EMP_ROLE_ID;
    private Integer EMPLOYEE_ID;
    private String EMPLOYEE_NAME;
    private String EMPLOYEE_NO;
    private String PHONE;
    private String USER_CODE;

    public Integer getIS_ONJOB() {
        return IS_ONJOB;
    }

    public void setIS_ONJOB(Integer IS_ONJOB) {
        this.IS_ONJOB = IS_ONJOB;
    }

    public String getDEALER_CODE() {
        return DEALER_CODE;
    }

    public void setDEALER_CODE(String DEALER_CODE) {
        this.DEALER_CODE = DEALER_CODE;
    }

    public String getEMP_ROLE() {
        return EMP_ROLE;
    }

    public void setEMP_ROLE(String EMP_ROLE) {
        this.EMP_ROLE = EMP_ROLE;
    }

    public String getEMP_ROLE_ID() {
        return EMP_ROLE_ID;
    }

    public void setEMP_ROLE_ID(String EMP_ROLE_ID) {
        this.EMP_ROLE_ID = EMP_ROLE_ID;
    }

    public Integer getEMPLOYEE_ID() {
        return EMPLOYEE_ID;
    }

    public void setEMPLOYEE_ID(Integer EMPLOYEE_ID) {
        this.EMPLOYEE_ID = EMPLOYEE_ID;
    }

    public String getEMPLOYEE_NAME() {
        return EMPLOYEE_NAME;
    }

    public void setEMPLOYEE_NAME(String EMPLOYEE_NAME) {
        this.EMPLOYEE_NAME = EMPLOYEE_NAME;
    }

    public String getEMPLOYEE_NO() {
        return EMPLOYEE_NO;
    }

    public void setEMPLOYEE_NO(String EMPLOYEE_NO) {
        this.EMPLOYEE_NO = EMPLOYEE_NO;
    }

    public String getPHONE() {
        return PHONE;
    }

    public void setPHONE(String PHONE) {
        this.PHONE = PHONE;
    }

    public String getUSER_CODE() {
        return USER_CODE;
    }

    public void setUSER_CODE(String USER_CODE) {
        this.USER_CODE = USER_CODE;
    }

    public User toUser(){
        User user = new User();
        user.setDealerId(DEALER_CODE);
        user.setRoleIds(EMP_ROLE_ID);
        user.setRoleName(EMP_ROLE);
        user.setPhone(PHONE);
        user.setLoginName(USER_CODE);
        user.setId(EMPLOYEE_ID);
        if(IS_ONJOB == 10081001){
            user.setQuited(false);
        }else{
            user.setQuited(true);
        }
        user.setUserName(EMPLOYEE_NAME);
        return user;
    }
}
